package net.zcy.zalllonely.common.exception;

import net.zcy.zalllonely.common.exception.enums.ResultEnum;

public class ZallException extends RuntimeException {

    private Integer code;

    public ZallException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public ZallException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
